home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Power 1997 December
/
MACPOWER-1997-12.ISO.7z
/
MACPOWER-1997-12.ISO
/
AMUG
/
PROGRAMMING
/
Raven 1.2.sit
/
Raven 1.2
/
Source
/
Foundation
/
OS
/
ZHelpMessage.h
< prev
next >
Wrap
Text File
|
1996-10-28
|
2KB
|
79 lines
/*
* File: ZHelpMessage.h
* Summary: A class that encapsulates a HMMessageRecord (ie the stuff in a help balloon).
* Written by: Jesse Jones
*
* Copyright ゥ 1996 Jesse Jones.
* For conditions of distribution and use, see copyright notice in ZTypes.h
*
* Change History (most recent first):
*
* <-> 8/01/96 JDJ Created
*/
#pragma once
#include <Balloons.h>
#include <string>
#include <ZTypes.h>
// ===================================================================================
// struct THelpMessage
// ===================================================================================
struct THelpMessage {
//-----------------------------------
// Initialization/Destruction
//
public:
THelpMessage();
// Inits message to an empty string.
THelpMessage(ResType type, ResID id);
// Type can be 'STR ', 'PICT', or 'TEXT'. Note that 'TEXT'
// requires a 'styl' resource with the same id.
THelpMessage(ResType type, ResID id, short index);
// Type must be 'STR#'.
THelpMessage(const string& mesg);
//-----------------------------------
// Conversion Operators
//
public:
operator const HMMessageRecord*() const {return &mMessage;}
//-----------------------------------
// Comparison Operators
//
public:
bool operator==(const THelpMessage& rhs) const;
bool operator!=(const THelpMessage& rhs) const {return !(*this == rhs);}
bool IsEmpty() const;
// Returns true if the message is an empty string.
//-----------------------------------
// Accesors
//
public:
ResType GetType() const;
// 'STRL' is used for string literals.
ResID GetID() const;
short GetIndex() const;
string GetStringLiteral() const;
//-----------------------------------
// Member data
//
private:
HMMessageRecord mMessage;
};